package com.example.demo.src;

public class OperationDiv extends Operation {

    @Override
    public double getResult() {
        double result = 0;

        try {
            if(getNumberB() == 0) {
                throw new Exception("除数不能为0");
            }
            result = getNumberA()/getNumberB();
        } catch (Exception e) {

        }
        return result;
    }
}
